//
//  OMSearchBar.h
//  OMENGO_NEW
//
//  Created by 梁尚嘉 on 2017/4/21.
//  Copyright © 2017年 Kamfat. All rights reserved.
//

#import "BaseView.h"
@class OMSearchBar;
@protocol OMSearchBarDelegate <NSObject>

@optional
- (void)searchBar:(OMSearchBar*)searchBar shouldChangeText:(NSString *)text;
- (void)searchBarShouldReturn:(OMSearchBar*)searchBar;
- (void)searchBarShouldClear:(OMSearchBar*)searchBar;
- (void)searchbarDidClickCancelButton:(OMSearchBar*)searchBar;
- (BOOL)searchBarShouldBeginEditing:(OMSearchBar*)searchBar;
@end
@interface OMSearchBar : BaseView
@property (nonatomic, weak) id<OMSearchBarDelegate> delegate;
@property (nonatomic, copy) NSString *text;
@property (nonatomic, assign) BOOL showCancelButton;//default is YES.
- (void)startEdit;
- (void)endEdit;
@end
